import { createApp } from 'vue'
import App from './App.vue'

import axios from "axios"
import router from './router/router.js';
import ElementPlus from "element-plus"
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import store from './store'

// app是vue是vue的实例对象
// 在一个vue项目中，有且只有一个vue实例对象
const app = createApp(App) ;

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 将axios挂在到全局
app.config.globalProperties.$axios = axios
app.use(ElementPlus)
// 注册vuex
app.use(store)
// App是根组件
app.use(router).mount('#app');

document.title = "运动会信息管理系统"
